package com.lykj.llw.box.adapter

import com.blankj.utilcode.util.ColorUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.lykj.llw.box.R
import com.lykj.llw.box.data.model.RechargeOptionModel

/**
 * ================================================
 * 平台币充值-金额选择适配器
 * ================================================
 *
 * @author gosha
 * @date 2023/10/16-14:57
 */
class RechargePTBAdapter :
    BaseQuickAdapter<RechargeOptionModel, BaseViewHolder>(R.layout.item_recharge_option) {
    override fun convert(holder: BaseViewHolder, item: RechargeOptionModel) {
        holder.setText(R.id.tv_ptb, "${item.amount}币")

        if (item.isCheck) {
            holder.setTextColor(R.id.tv_ptb, ColorUtils.getColor(R.color.blue_FF664FC3))
        } else {
            holder.setTextColor(R.id.tv_ptb, ColorUtils.getColor(R.color.grey_FF999999))
        }
    }
}